<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>蓝牌添加页面</title>
    <link rel="stylesheet" href="../../../yl/index.css" />
    <!-- 布局样式 -->
    <link rel="stylesheet" href="../../../yl/style.css" />
    <link rel="stylesheet" href="../../../style/wangeditor.css">
    <link rel="stylesheet" href="../../../yl/mobile.css" />
    <link rel="stylesheet" href="../../../yl/easyui.css" />
    <link rel="stylesheet" href="../../../yl/icon.css" />
</head>

<body>
    <!-- <div id="app"> -->
    <div class="easyui-navpanel" id="app" v-cloak>
        <header>
            <div class="m-toolbar">
                <div class="m-title">{{action=='Add'?'查看蓝牌信息':action=='Modify'?'查看蓝牌信息':''}}</div>
            </div>
        </header>
        <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
            id="MainTable" ref="MainTable"
            :data-options="JSON.stringify({ 'TableName': 'blue_plate_information', 'form': 'dataForm' ,'primary_key':'Blue_Plate_SerialNumber' })">
            <div class="yl-main">
                <div class="table_titel">
                  <div class="titel">标签</div>
                </div>
                <el-form :model="dataForm" ref="form" inline-message="true" style="width: 100%">
                    <el-descriptions :column="1" size="large" border>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">蓝牌编号</div>
                            </template>
                            <el-form-item prop="Blue_Plate_SerialNumber"
                                :rules="[{ required: true, message: '请输入蓝牌编号', trigger: 'blur' }]">
                                <el-input disabled v-model.trim="dataForm.Blue_Plate_SerialNumber" class="borderless-input"
                                    placeholder="请输入蓝牌编号" />
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">蓝牌名称</div>
                            </template>
                            <el-form-item prop="Blue_Plate_Name"
                                :rules="[{ required: true, message: '请输入蓝牌名称', trigger: 'blur' }]">
                                <el-input disabled v-model.trim="dataForm.Blue_Plate_Name" class="borderless-input"
                                    placeholder="请输入蓝牌名称" />
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">蓝牌类型</div>
                            </template>
                            <el-form-item prop="Plate_Type_SerialNumber"
                                :rules="[{ required: true, message: '请选择蓝牌类型', trigger: 'change' }]">
                                <el-select disabled clearable v-model.trim="dataForm.Plate_Type_SerialNumber" placeholder="请选择蓝牌类型"
                                    filterable style="width: 100%">
                                    <el-option v-for="(item,index) in ['居民户','商户','企业']" :key="index" :label="item"
                                        :value="item"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">省/市/区(县)</div>
                            </template>
                            <el-cascader disabled @change="changeCity" v-model="cityValue" filterable class="borderless-input"
                                :props="{value:'value',label:'label',children:'children'}" placeholder="请选择省/市/区(县)"
                                :options="city" style="width: 100%"></el-cascader>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">乡镇(街道)/村庄(社区)</div>
                            </template>
                            <el-form-item prop="Village_SerialNumber"
                                :rules="[{ required: true, message: '请选择乡镇(街道)/村庄(社区)', trigger: 'change' }]">
                                <el-cascader disabled :disabled="city1.length == 0" @change="changeCity1" class="borderless-input"
                                    v-model="cityValue1" filterable
                                    :props="{value:'ProvinceNumber',label:'Province',children:'children'}"
                                    placeholder="请选择乡镇(街道)/村庄(社区)" :options="city1" style="width: 100%"></el-cascader>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">详细地址</div>
                            </template>
                            <el-form-item prop="Address" :rules="[{ required: true, message: '请输入详细地址', trigger: 'blur' }]">
                                <el-input  disabled v-model.trim="dataForm.Address" class="borderless-input" placeholder="请输入详细地址" />
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">蓝牌坐标集</div>
                            </template>
                            <el-form-item prop="Coords"  :rules="[{ required: true, validator:IS_Coords, trigger: 'blur' }]">
                                <el-input disabled type="textarea" :autosize="{ minRows: 2}" v-model.trim="dataForm.Coords"
                                    class="borderless-input" placeholder="请输入蓝牌坐标集" />
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">负责人</div>
                            </template>
                            <el-form-item prop="Responsible_Person"
                                :rules="[{ required: true, message: '请选择负责人', trigger: 'change' }]">
                                <el-select disabled clearable v-model.trim="dataForm.Responsible_Person" placeholder="请选择负责人"
                                    filterable style="width: 100%">
                                    <el-option v-for="(item,index) in personal" :key="index" :label="item.Personal_Name"
                                        :value="item.ID_Card_Number"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">联系电话</div>
                            </template>
                            <el-form-item prop="Contact_Phone"
                                :rules="[{ required: true, message: '请输入联系电话', trigger: 'blur' }]">
                                <el-input disabled v-model.trim="dataForm.Contact_Phone" class="borderless-input"
                                    placeholder="请输入联系电话" />
                            </el-form-item>
                        </el-descriptions-item>
                    </el-descriptions>
                </el-form>
                <div id="ChildTable">
                    <div class="table_titel">
                        <div class="titel">标签</div>
                    </div>
                    <el-form :model="{childDataForm}" ref="form1" inline-message="true" style="width: 100%">
                        <el-descriptions
                            :data-options="JSON.stringify({ 'TableName': 'blue_plate_mapping_tags', 'form': 'childDataForm', 'ParentTableName': 'blue_plate_information'})"
                            :column="2" size="large" border
                            v-for="(item,index) in childDataForm.filter(item => item.Row_Status != '1')" :key="index">
                            <el-descriptions-item>
                                <template #label>
                                    <div class="cell-item">标签</div>
                                </template>
                                <!-- <el-form-item :prop="'childDataForm.'+ index + '.Village_Collective_SerialNumber'" :rules="[{ required: true, message: '请选择小区', trigger: 'change' }]"> -->
                                <el-select disabled @change="changeTag" clearable v-model.trim="item.Blue_Plate_Tag_SerialNumber"
                                    placeholder="请选择适用标签" filterable style="width: 100%">
                                    <el-option v-for="(item,index) in blue_plate_tags" :key="index"
                                        :label="item.Blue_Plate_Tag" :value="item.Blue_Plate_Tag_SerialNumber"></el-option>
                                </el-select>
                                <!-- </el-form-item> -->
                            </el-descriptions-item>
                        </el-descriptions>
                    </el-form>
                </div>
            </div>
        </div>
        <footer class="botton-ann">
            <el-button @click="goBack">返回</el-button>
        </footer>
    </div>
</body>
<script src="../../../utils/utils.js"></script>
<script src="../../../config/config.js"></script>
<script src="../../../utils/compressor.js"></script>
<script src="../../../utils/wangeditor.js"></script>
<script src="../../../utils/mixins.js"></script>
<script src="../../../yl/vue.js"></script>
<script src="../../../yl/index.js"></script>
<script src="../../../yl/zh-cn.mjs"></script>
<script src="../../../yl/index.iife.min.js"></script>
<script src="../../../yl/jquery.min.js"></script>
<script src="../../../utils/jquery.cookie.js"></script>
<script src="../../../yl/jquery.easyui.min.js"></script>
<script src="../../../yl/jquery.easyui.mobile.js"></script>
<script src="../../../yl/moment.min.js"></script>
<script src="../../../api/request.js"></script>
<script src="./js/show.js"></script>

</html>